home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.2 / Video Toaster v4.2.iso / arexx / editor / buttaudio.rexx < prev    next >
OS/2 REXX Batch file  |  1995-11-21  |  1KB  |  61 lines

  1. /* ButtAudio.rexx V2.0 -- Butt all your audio clips together. */
  2. /* By Bob Caron (Grue) ©1995 NewTek Inc.    (Remember...)     */
  3.  
  4. call remlib('PROJECT_REXX_PORT')
  5. call addlib('PROJECT_REXX_PORT',0)
  6.  
  7. call set_view(2)
  8.  
  9. call req_error("ButtAudio V2.0     ---    Adjust audio clip start times to play one after another.")
  10.  
  11. if req_tell("Ok to butt ALL audio start times?") = 0 then call quit
  12.  
  13. start_loc=croutonspot()
  14. call croutonpick(LAST)
  15. project_end=croutonspot()
  16. call croutonpick(FIRST)
  17.  
  18. current_spot=0
  19. isaudio=0
  20.  
  21. do while (current_spot<project_end+1)
  22.    call croutonpick(current_spot)
  23.    current_spot=current_spot+1
  24.    if croutontype()=" AUD" then do
  25.       prevstart=croutongettag(Delay)
  26.       isaudio=1
  27.       current_temp=current_spot
  28.       current_spot=project_end+1
  29.       end
  30.    end
  31.  
  32. if isaudio=0 then do
  33.    call req_tell("There are NO audio croutons!")
  34.    call quit
  35.    end
  36.  
  37. current_spot=current_temp-1
  38.  
  39. call req_open("Working... Please wait.")
  40. do current_spot=current_temp-1 to project_end
  41.    if crnumtype(current_spot)=" AUD" then do
  42.       call crnumsettag(current_spot,Delay,PrevStart)
  43.       call crnumsettag(current_spot,TimeMode,2) /* Locking to 1=inpoint 0=clip */
  44.       end
  45.    prevstart=prevstart+crnumgettag(current_spot,AudioDuration)
  46.    end
  47.  
  48. call req_close()
  49. call croutonpick(start_loc)
  50. call projectupdate()
  51. call req_error("All Done!")
  52. call remlib("PROJECT_REXX_PORT")
  53. exit
  54.  
  55. quit:
  56.  
  57. call req_error("")
  58. call remlib("PROJECT_REXX_PORT")
  59.  
  60. exit
  61.